<?php defined( '_JEXEC' ) or die( 'Restricted access' );?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
    <jdoc:include type="head" />
    
    <link rel="stylesheet" href="<?php echo $this->baseurl  ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/<?php echo ($this->params->get('background')=='')?'white':$this->params->get('background'); ?>_bg.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/size/<?php echo ($this->params->get('size')=='')?'medium':$this->params->get('size'); ?>.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template/<?php echo ($this->params->get('template')=='')?'classic':$this->params->get('template'); ?>.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/fonts/<?php echo ($this->params->get('fonts')=='')?'ubuntuMonoB':$this->params->get('fonts'); ?>.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/responsive/<?php echo ($this->params->get('responsive')=='')?'responsive':$this->params->get('responsive'); ?>.css" type="text/css" />
    <?php if($this->params->get('responsive') == "no") : ?>
        <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/sidebar/normal/<?php echo ($this->params->get('sidebar')=='')?'none':$this->params->get('sidebar'); ?>.css" type="text/css" />
    <?php elseif($this->params->get('responsive') == "responsive") : ?>
        <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/sidebar/responsive/<?php echo ($this->params->get('sidebar')=='')?'none':$this->params->get('sidebar'); ?>.css" type="text/css" />
    <?php else : ?>
        <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/sidebar/responsive/<?php echo ($this->params->get('sidebar')=='')?'both':$this->params->get('sidebar'); ?>.css" type="text/css" />
    <?php endif; ?>
</head>
    
<body>
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/it_IT/sdk.js#xfbml=1&version=v2.0";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    
    <div id="container">
        <div id="mainmenu">
            <jdoc:include type="modules" name="mainmenu" />
        </div>
        
        <?php if (($this->params->get('show1')=='true') || ($this->params->get('show2')=='true') || ($this->params->get('show3')=='true')) : ?>
        <div class="panels">
            <?php if($this->params->get('show1')=='true') : ?>
            <div class="panel">
                <jdoc:include type="modules" name="panel1"/>
            </div>
            <?php endif; ?>
            
            <?php if($this->params->get('show2')=='true') : ?>
            <div class="panel">
                <jdoc:include type="modules" name="panel2"/>
            </div>
            <?php endif; ?>
            
            <?php if($this->params->get('show3')=='true') : ?>
            <div class="panel">
                <jdoc:include type="modules" name="panel3"/>
            </div>
            <?php endif; ?>
        </div>
        <?php endif; ?>

        <div id="sidebar_left" class="sidebar float left">
            <jdoc:include type="modules" name="left"/>
            
            <div class="social fb" style="overflow: hidden;width: <?php echo $this->params->get('fbLikeBoxWidth');?>">
                <?php if($this->params->get('fbLikeBox')!='') : ?>
                    <?php
                        $width  = ($this->params->get('fbLikeBoxWidth')!='' &&  strstr($this->params->get('fbLikeBoxWidth'), '%')!=false) ? $this->params->get('fbLikeBoxWidth'):'100';
                        $height = ($this->params->get('fbLikeBoxHeight')!='' && strstr($this->params->get('fbLikeBoxHeight'), '%')!=false)? $this->params->get('fbLikeBoxHeight'):'590';
                    ?>
                    <iframe 
                        src="//www.facebook.com/plugins/likebox.php?href=<?php echo $this->params->get('fbLikeBox') ?>&width=100&amp;height=<?php echo $height; ?>&amp;colorscheme=<?php echo $this->params->get('fbLikeBoxColorScheme');?>&amp;show_faces=true&amp;header=true&amp;stream=true&amp;show_border=true" 
                        scrolling="no" 
                        frameborder="0" 
                        style="border:none; overflow:hidden; width:<?php echo $width;?>; height:<?php echo $height;?>px;" 
                        allowTransparency="true">
                    </iframe>
                <?php endif; ?>
            </div>
        </div>

        <div id="content" class="float left">
            <jdoc:include type="component" />
        </div>

        <div class="sidebar float right">
            <jdoc:include type="modules" name="right"/>
        </div>

        <div id="footer" class="clear">
            <div class="menu">
                <jdoc:include type="modules" name="mainmenu" />
            </div>
            
            <div class="menu">
                <jdoc:include type="modules" name="footermenu1" />
            </div>
            
            <div class="menu">
                <jdoc:include type="modules" name="footermenu2" />
            </div>
            
            <div class="footer">
                <jdoc:include type="modules" name="footer" />
            </div>
        </div>

    </div>
</body>
</html>